<%--
  Created by IntelliJ IDEA.
  User: hp
  Date: 2018/8/10
  Time: 15:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <%--<link rel="stylesheet" type="text/css" href="css/deletestu.css"/>--%>

    <link rel="stylesheet" type="text/css" href="css/checkdor.css"/>
</head>
<body>
<div id="top">
    <form class="form-inline"action="${pageContext.request.contextPath}/SingleCheckServlet.do"method="post">
        <div class="form-group">
            <label for="exampleInputName2">宿舍楼号</label>
            <input type="text" class="form-control" id="exampleInputName2" name="dor_build" >
        </div>
        <div class="form-group">
            <label for="exampleInputEmail2">房间号</label>
            <input type="text" class="form-control" id="exampleInputEmail2" name="dor_no">
        </div>
        <button type="submit" class="btn btn-success">搜索</button>
    </form>

</div>

<div id="stuInfo">
    <table class="dataintable">
        <tr>
            <td>宿舍楼</td>
            <td>房间号</td>
            <td>床位数</td>
            <td>宿舍类别</td>
            <td>房间朝向</td>
            <td>宿舍成员</td>

        </tr>


      <c:forEach var="list" items="${sessionScope.list}">
          <tr>
              <td>${list.dor_build}</td>
              <td>${list.dor_no}</td>
              <td>${list.dor_bednum}</td>
              <td>${list.dor_type}</td>
              <td>${list.dor_dir}</td>
              <td>${list.w}</td>

          </tr>
      </c:forEach>

    </table>
</div>

<div id="foot">
    ${sessionScope.pageIndex}/${sessionScope.pageNum}

    <c:if test="${sessionScope.pageIndex==1}">
        首页
        上一页
    </c:if>
    <c:if test="${sessionScope.pageIndex>1}">
        <a href="${pageContext.request.contextPath}/ToCheckDorServlet.do?pageIndex=1">首页</a>
        <a href="${pageContext.request.contextPath}/ToCheckDorServlet.do?pageIndex=${sessionScope.pageIndex-1}">上一页</a>
    </c:if>
    <c:if test="${sessionScope.pageIndex<sessionScope.pageNum}">
        <a href="${pageContext.request.contextPath}/ToCheckDorServlet.do?pageIndex=${sessionScope.pageIndex+1}">下一页</a>
        <a href="${pageContext.request.contextPath}/ToCheckDorServlet.do?pageIndex=${sessionScope.pageNum}">尾页</a>
    </c:if>
    <c:if test="${sessionScope.pageIndex==sessionScope.pageNum}">
        下一页
        尾页
    </c:if>
</div>
</div>
</div>
</body>
</html>
